<template>
  <div>
    <div slot="header">
      <div class="search-header">
        <span>线上热门搜索</span>
        <el-dropdown>
          <span class="el-dropdown-link">
            <i class="el-icon-more" />
          </span>
          <el-dropdown-menu slot="dropdown">
            <el-dropdown-item>黄金糕</el-dropdown-item>
            <el-dropdown-item>狮子头</el-dropdown-item>
            <el-dropdown-item>螺蛳粉</el-dropdown-item>
            <el-dropdown-item>双皮奶</el-dropdown-item>
            <el-dropdown-item>蚵仔煎</el-dropdown-item>
          </el-dropdown-menu>
        </el-dropdown>
      </div>
    </div>
    <div>
      <el-row :gutter="10">
        <el-col :span="12">
          <LineCharts />
        </el-col>
        <el-col :span="12">
          <LineCharts />
        </el-col>
      </el-row>
      <el-table :data="tableData" style="width: 100%" :default-sort="{prop: 'date', order: 'descending'}" border>
        <el-table-column type="index" label="排名" width="70" />
        <el-table-column prop="name" label="搜索关键字" width="width" />
        <el-table-column prop="name" label="用户数" sortable width="width" />
        <el-table-column prop="name" label="周涨幅" sortable width="width" />
      </el-table>
      <el-pagination
        style="text-align: right; padding: 5px 0px;"
        layout="prev, pager, next"
        :total="1000"
      />
    </div>
  </div>
</template>

<script>
import LineCharts from './lineCharts'
export default {
  name: 'Search',
  components: {
    LineCharts
  },
  data() {
    return {
      tableData: [
        { name: '王小虎' }
      ]
    }
  }
}
</script>

<style scoped>
.search-header{
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #d9d9d9;
  padding: 10px 0px 15px 0px;
}
</style>
